package com.qezhhnjy.bilibili.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author zhaoyangfu - 2021/4/5 20:24
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    public static final String URL = "http://nacos-payment-provider";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping("/payment/nacos")
    public String info() {
        return restTemplate.getForObject(URL + "/payment/nacos", String.class);
    }

}
